<template>
  <div class="did-h">
    <div class="black black-h">
      <div>注册成为权威机构。</div>
      <el-row :gutter="20" class="mt3">
        <el-col :span="10" :offset="6">
          <el-form label-position="right" label-width="180px" :model="form">
            <el-form-item label="授权机构DID">
              <el-input v-model="form.did" placeholder="请输入授权机构DID"></el-input>
            </el-form-item>
            <el-form-item label="授权机构名称">
              <el-input v-model="form.authorityName" placeholder="请输入授权机构名称"></el-input>
            </el-form-item>
          </el-form>
        </el-col>
      </el-row>
      <div class="did-button">
        <el-button size="medium" type="primary" @click="registrationAuthorityIssuer">注册权威机构</el-button>
      </div>
    </div>
    <div class="black mt1 black-height text-c" >
      {{data.msg=='Success'?'注册权威机构成功':''}}
    </div>
  </div>
</template>
<script>
import NoData from '../../../components/noData.vue';
export default {
  components: {
    NoData,
  },
  data() {
    return {
      activeName: 'first',
      form: {
        did: '',
        authorityName: '',
      },
      data:''
    };
  },
  mounted() {},
  methods: {
    async registrationAuthorityIssuer(){
      this.data = ''
      let res = await this.$http.post(this.$api.authorityIssuer.registrationAuthorityIssuer,this.form);
      if (res.code == 200) {
        this.data = res;
      }
    }
  },
};
</script>
<style lang="less" scoped>
.did-content {
  margin-top: 10%;
  h1 {
    color: #666666;
    width: 320px;
    margin: 0 auto;
  }
}
.did-button {
  width: 100px;
  margin: 0 auto;
  margin-top: 20px;
}
.m-a0 {
  margin: 0 auto;
}
.black-h {
  height: 50%;
}
.black-height {
  height: calc(50% - 90px);
}
.nodata {
  margin-top: 10%;
}
.did-width {
  width: 500px;
  margin: 0 auto;
}
.text-c{
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}
</style>
